Event.observe(window, 'load', function() {

	//Event.addBehavior({ 'a.popup': Popup.TriggerBehavior() });
	
}); 


var viewArticules = function(){
	
	IDialog.buildWindow("mensaje", "Seleccionar Articulo", "Mostrar Todos | Buscar", 
			{
				'Aceptar': function(){ IDialog.close(); }
			}, {width: '700px'});
	IDialog.show();
	
	doLoadArticles();
};


var doLoadArticles = function(){
	
	new Ajax.Updater(IDialog.props.content, 'articulo.htm', {
		parameters: {'method':'listar'},
		onCreate: function(){
			IDialog.setContent(IGlobal.loadingInfo);
		},
		onException: function(t,e){
			alert(e.message);
		}
	});
};


var selectedArticulo = function(){

	
	
};